package com.ruoyi.UserAddress.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.UserAddress.mapper.UserAddressMapper;
import com.ruoyi.UserAddress.domain.UserAddress;
import com.ruoyi.UserAddress.service.IUserAddressService;
import com.ruoyi.common.core.text.Convert;

/**
 * 用户地址中间 服务层实现
 * 
 * @author ruoyi
 * @date 2019-07-26
 */
@Service
public class UserAddressServiceImpl implements IUserAddressService 
{
	@Autowired
	private UserAddressMapper userAddressMapper;

	/**
     * 查询用户地址中间信息
     * 
     * @param id 用户地址中间ID
     * @return 用户地址中间信息
     */
    @Override
	public UserAddress selectUserAddressById(Integer id)
	{
	    return userAddressMapper.selectUserAddressById(id);
	}
    
    @Override
    public UserAddress selectUserAddressByIdChinese(Integer id)
   	{
   	    return userAddressMapper.selectUserAddressByIdChinese(id);
   	}
	
	/**
     * 查询用户地址中间列表
     * 
     * @param userAddress 用户地址中间信息
     * @return 用户地址中间集合
     */
	@Override
	public List<UserAddress> selectUserAddressList(UserAddress userAddress)
	{
	    return userAddressMapper.selectUserAddressList(userAddress);
	}
	
    /**
     * 新增用户地址中间
     * 
     * @param userAddress 用户地址中间信息
     * @return 结果
     */
	@Override
	public int insertUserAddress(UserAddress userAddress)
	{
	    return userAddressMapper.insertUserAddress(userAddress);
	}
	
	/**
     * 修改用户地址中间
     * 
     * @param userAddress 用户地址中间信息
     * @return 结果
     */
	@Override
	public int updateUserAddress(UserAddress userAddress)
	{
	    return userAddressMapper.updateUserAddress(userAddress);
	}

	/**
     * 删除用户地址中间对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteUserAddressByIds(String ids)
	{
		return userAddressMapper.deleteUserAddressByIds(Convert.toStrArray(ids));
	}
	
}
